.\" $OpenBSD: SSL_CTX_set_num_tickets.3,v 1.2 2021/10/23 17:20:50 schwarze Exp $
.\" OpenSSL pod checked up to: 5402f96a Sep 11 09:58:52 2021 +0100
.\"
.\" Copyright (c) 2021 Bob Beck <beck@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: October 23 2021 $
.Dt SSL_CTX_SET_NUM_TICKETS 3
.Os
.Sh NAME
.Nm SSL_CTX_set_num_tickets ,
.Nm SSL_CTX_get_num_tickets ,
.Nm SSL_set_num_tickets ,
.Nm SSL_get_num_tickets
.Nd set and get the number of TLS 1.3 session tickets to be sent
.Sh SYNOPSIS
.In openssl/ssl.h
.Ft int
.Fn SSL_CTX_set_num_tickets "SSL_CTX *ctx" "size_t num_tickets"
.Ft size_t
.Fn SSL_CTX_get_num_tickets "const SSL_CTX *ctx"
.Ft int
.Fn SSL_set_num_tickets "SSL *ssl" "size_t num_tickets"
.Ft size_t
.Fn SSL_get_num_tickets "const SSL *ssl"
.Sh DESCRIPTION
These functions set and retrieve
the configured number of session tickets for
.Fa ctx
and
.Fa ssl ,
respectively.
.Pp
They are provided only for compatibility with OpenSSL
and have no effect in LibreSSL.
.Sh RETURN VALUES
.Fn SSL_CTX_set_num_tickets
and
.Fn SSL_set_num_tickets
always return 1.
.Pp
.Fn SSL_CTX_get_num_tickets
and
.Fn SSL_get_num_tickets
return the previously set number of tickets, or 0 if it has not been set.
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_CTX_new 3
.Sh HISTORY
These function first appeared in OpenSSL 1.1.1
and have been available since
.Ox 7.1 .
